Adds up the values at the input connector from each step or event and shows the total contents at the output connector. This is essentially a sum operation with no delay.
Note: Don't use this if you want the sum to be related to time periods or fractions of time periods. Use the Holding Tank block to do integration (see the Holding Tank block in this library).
The Accumulate block may be used as a storage bin, reservoir, stock, or any other function that involves adding many different values together. Examples of where you would use an Accumulate block are to determine bank balance, billable hours, or number of customers served.
Dialog Choices
Display contents: Total of the values in the Accumulate block. This number may be positive or negative, depending on the inputs.
Starting contents: You may enter an initial value in the Accumulate block (the default is 0). If the S connector is connected, its value overrides Starting contents.
Connectors
The input connector inputs values to be accumulated (may be positive or negative).
C: Contents. Total of the values in the Accumulate block (may be positive or negative).
R: Setting the R connector to true (a value greater than 0.5) resets the entire contents to the initial value (either from the Starting contents dialog or from the S connector) which is in effect at the time of reset.
S: The S connector lets you set the initial value of the Accumulate block at the beginning of each simulation run, or you can specify the initial value in the Starting contents dialog. If the S connector is connected, it overrides Starting contents in the dialog. After the first value, subsequent values at the S connector are ignored until the next simulation run, or until the Accumulate block is reset from the R connector.
Animation
The contents of the block at each step/event is represented by a level which rises and falls.
The level assumes a minimum value of 0. The maximum value is continually adjusted to be the maximum received during the run. Subsequent runs change the maximum to be the previous runs' maximum value.